Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry failed tasks via admin #1549

Merged
merged 12 commits into from
Feb 18, 2025
Merged

Retry failed tasks via admin #1549

merged 12 commits into from
Feb 18, 2025

Conversation

haider-rs
Copy link
Contributor

@haider-rs haider-rs commented Feb 13, 2025

Description

  • Saves failed tasks in a new storage in task pallet.
  • Provides runtime api to get all failed tasks.
  • Provides a new extrinsic to retry a failed task via admin.
  • Provided tc-cli utils to list failed task.
  • Provides tc-cli command to retry failed task.
  • Adds tests in pallet task.
  • Adds benchmarks for extrinsic restart_batch

Fixes # (issue)
closes: #1394

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:

Code review prechecks:

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Inline comments have been added for each method
  • I have made corresponding changes to the documentation
  • Code changes introduces no new problems or warnings
  • Test cases have been added
  • Dependent changes have been merged and published in downstream modules

@haider-rs haider-rs requested a review from dvc94ch February 13, 2025 17:43
@haider-rs haider-rs self-assigned this Feb 13, 2025
@haider-rs haider-rs requested a review from 4meta5 February 13, 2025 17:47
Copy link
Contributor

@4meta5 4meta5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Only nit was the weight hint but that can be in a follow up. Benchmarking should probably assume a worse case though (conservatively large number of failed batches)

@haider-rs haider-rs requested a review from 4meta5 February 14, 2025 18:14
Copy link
Collaborator

@dvc94ch dvc94ch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. we just need to avoid vecs especially if a storage map can be used...

@haider-rs haider-rs force-pushed the retry-failed-tasks branch 2 times, most recently from 15e6fd8 to 3350484 Compare February 18, 2025 10:18
@haider-rs haider-rs merged commit d432500 into development Feb 18, 2025
13 of 14 checks passed
@haider-rs haider-rs deleted the retry-failed-tasks branch February 18, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tc-cli should be able to list failed tasks and force the timechain to retry them
3 participants